home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / devel / wild / support / profilerlibrary / testusinggoodcode.s < prev   
Text File  |  1999-01-01  |  832b  |  60 lines

  1.     include    profiler.i
  2.     
  3. Do    ProfilerInit.TEstApP!    Ev1,Ev2,Ev3,More,Stupid
  4.  
  5.     movea.l    4.w,a6
  6.     jsr    _LVOForbid(a6)
  7.     jsr    _LVODisable(a6)
  8.     
  9.     bsr    TestThat
  10.  
  11.     movea.l    4.w,a6
  12.     jsr    _LVOEnable(a6)
  13.     jsr    _LVOPermit(a6)
  14.  
  15.     ProfilerLog    
  16.     ProfilerClose
  17.     rts
  18.  
  19.         cnop    0,4
  20. TestThat    moveq.l    #10,d5
  21. .do
  22.         ProfilerCycle
  23.         moveq.l    #127,d6
  24.         bra.b    .entry
  25. .loop        clr.l    -(a7)
  26.         clr.l    -(a7)
  27.         clr.l    -(a7)
  28.         clr.l    -(a7)
  29.         clr.l    -(a7)
  30.         clr.l    -(a7)
  31.         clr.l    -(a7)
  32.         clr.l    -(a7)
  33.         lea.l    32(a7),a7
  34.         dbra    d7,.loop
  35. .entry        moveq.l    #127,d7
  36.         dbra    d6,.loop
  37.         
  38.         ProfilerEvent    ;ev1
  39.  
  40.         moveq.l    #127,d6
  41.         bra.b    .entry2
  42. .loop2        lea.l    -32(a7),a7
  43.         clr.l    (a7)+
  44.         clr.l    (a7)+
  45.         clr.l    (a7)+
  46.         clr.l    (a7)+
  47.         clr.l    (a7)+
  48.         clr.l    (a7)+
  49.         clr.l    (a7)+
  50.         clr.l    (a7)+
  51.         dbra    d7,.loop2
  52. .entry2        moveq.l    #127,d7
  53.         dbra    d6,.loop2
  54.         ProfilerEvent    ;ev2
  55.         
  56.         ProfilerEnd
  57.         dbra    d5,.do
  58.         rts
  59.     
  60.